//package com.atguigu.ssyx.product.controller;


import com.atguigu.ssyx.common.result.Result;
//import com.atguigu.ssyx.product.service.FileUploadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

//@Api(tags = "文件上传接口")
//@RestController
//@RequestMapping("admin/product")
//public class FileUploadController {
//
//    @Autowired
//    private FileUploadService fileUploadService;
//
//    //图片上传的方法
//    @ApiOperation("图片上传")
//    @PostMapping("fileUpload")
//    public Result fileUpload(MultipartFile file) {
//        String url = fileUploadService.uploadFile(file);
//        return Result.ok(url);
//    }
//}

//@Api(tags = "文件上传接口")
//@RestController
//@RequestMapping("admin/product")
////@Tag(name = "文件管理")
//public class FileUploadController {
//    @Autowired
//    private FileUploadService fileUploadService;
//
//    //图片上传的方法
//    @ApiOperation("图片上传")
//    @PostMapping("fileUpload")
////    @Operation(summary = "上传文件")
//    public Result fileUpload(@RequestParam("file") MultipartFile file) throws IOException {
//        FileVO upload = uploadService.upload(file);
//        return new Result().ok(upload);
//    }
//}
